<?php
define('SUB_DIR','/api');
require '../core/service/fanwe.service.php';
$fanwe = &FanweService::instance();
$fanwe->is_group_city = false;
$fanwe->is_session = false;
$fanwe->is_user = false;
$fanwe->is_cron = false;
$fanwe->cache_list = array();
$fanwe->initialize();

$cfg = unserialize($_FANWE['setting']['integrate_config']);
define('UC_CONNECT', isset($cfg['uc_connect'])?$cfg['uc_connect']:'');
define('UC_DBHOST', isset($cfg['db_host'])?$cfg['db_host']:'');
define('UC_DBUSER', isset($cfg['db_user'])?$cfg['db_user']:'');
define('UC_DBPW', isset($cfg['db_pass'])?$cfg['db_pass']:'');
define('UC_DBNAME', isset($cfg['db_name'])?$cfg['db_name']:'');
define('UC_DBCHARSET', isset($cfg['db_charset'])?strtolower($cfg['db_charset']):'utf8');
define('UC_DBTABLEPRE', $cfg['db_pre']);
define('UC_DBCONNECT', '0');
define('UC_KEY', isset($cfg['uc_key'])?$cfg['uc_key']:'');
define('UC_API', isset($cfg['uc_url'])?$cfg['uc_url']:'');
define('UC_CHARSET', isset($cfg['uc_charset'])?$cfg['uc_charset']:'');
define('UC_IP', isset($cfg['uc_ip'])?$cfg['uc_ip']:'');
define('UC_APPID', isset($cfg['uc_id'])?$cfg['uc_id']:'');
define('UC_PPP', '20');
?>